package com.mjl.shops.activity;


import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.Window;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.mjl.shops.R;
import com.mjl.shops.base.BaseActivity;
import com.mjl.shops.utils.CommUtils;
import com.mjl.shops.view.IconTextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class SetingActivity extends BaseActivity {

    @BindView(R.id.icon_back)
    IconTextView icon_back;

    @BindView(R.id.user_infor_rl)
    RelativeLayout user_infor_rl;

    @BindView(R.id.replace_pass_rl)
    RelativeLayout replace_pass_rl;

    @BindView(R.id.clear_cache_rl)
    RelativeLayout clear_cache_rl;

    @BindView(R.id.about_app_rl)
    RelativeLayout about_app_rl;

    @BindView(R.id.exit_login_tv)
    TextView exit_login_tv;

    @Override
    protected void setContentViewBefore() {
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
    }

    @Override
    protected int getViews() {
        return R.layout.activity_setint;
    }

    @Override
    protected void setViews() {
        ButterKnife.bind(this);
    }

    @Override
    protected void setDate() {

    }

    @Override
    protected String getStateColor() {
        return CommUtils.color_05000000;
    }

    @Override
    protected int getStetaBackgroundStyle() {
        return 1;
    }

    @OnClick({R.id.icon_back,R.id.user_infor_rl,R.id.replace_pass_rl,R.id.clear_cache_rl,R.id.about_app_rl,R.id.exit_login_tv})
    public void OnClick(View view) {
        switch (view.getId()) {
            case R.id.icon_back:
                finish();
                break;
            case R.id.user_infor_rl:
                ReplaceActivity.StartIntent(SetingActivity.this);
                break;
            case R.id.replace_pass_rl:
                ReplacePassActivity.StartIntent(SetingActivity.this);
                break;
            case R.id.clear_cache_rl:
                ClearCacheActivity.StartIntent(SetingActivity.this);
                break;
            case R.id.about_app_rl:
                AboutAppActivity.StartIntent(SetingActivity.this);
                break;
            case R.id.exit_login_tv:
                CommUtils.setToast("退出登录敬请期待");
                break;
            default:
                break;
        }
    }

    public static void StartIntent(Context contexts) {
        Intent intent = new Intent(contexts, SetingActivity.class);
        contexts.startActivity(intent);
    }
}
